#pragma once
#include "Ship.h"

namespace dxroids
{   
   class EnemyShip : public Ship
   {

   public:

      enum Size { Large, Small };

      EnemyShip(std::shared_ptr<SoundManager> const & _sound_manager, Size _size, Vector const & _pos);           
      virtual ~EnemyShip();

      virtual std::unique_ptr<GameObject> Destroy(std::shared_ptr<SoundManager> const & _sound_manager) override;

      Size GetSize() const;
      void SetTarget(Vector const & _pos);

   private:      

      virtual DXROIDS_COM_PTR<ID2D1Geometry> CreateShipGeometry(
         DXROIDS_COM_PTR<ID2D1Factory> const & _factory, float _scale) override;

      virtual DXROIDS_COM_PTR<ID2D1Geometry> CreateThrustGeometry(
         DXROIDS_COM_PTR<ID2D1Factory> const & _factory, float _scale) override;

      virtual float GetNextShotDirection() const override;      

   private:

      Size size_;      
      SoundEffect effect_;
      Vector target_;
      std::shared_ptr<SoundManager> sound_manager_;
   };   
}

inline dxroids::EnemyShip::Size dxroids::EnemyShip::GetSize() const
{
   return size_;
}

inline void dxroids::EnemyShip::SetTarget(Vector const & _v)
{
   target_ = _v;
}

